<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登陆操作</title>
</head>
<body>
<p>当前会话【<%=session.getId()%>】</p>
<p>
<%
	String userCd=request.getParameter("userCd");
	String userNm=request.getParameter("userNm");
	String userPwd=request.getParameter("userPwd");
	//登陆成功
	out.print(userCd);
	if("123456".equals(userPwd)){
		out.println("登陆成功,账号写入会话");	
		session.setAttribute("userCd", userCd);
		session.setAttribute("userNm", userNm);
		out.println("<a href='index.jsp'>主页</a>");
	}else{//登陆失败
		out.println("登陆失败.默认密码为123456");	
		out.println("<a href='login.jsp'>登录</a>");
	}
%>	
</p>
</body>
</html>